<template>
	<view>
		<uni-list>
		    <uni-list-item v-for="(item, index) in housList"
				:key="index"
				:title="item.name"
				@click="djxm(item)">
				</uni-list-item>
		</uni-list>
	</view>
</template>

<script>
	import uniList from "@/components/uni-list/uni-list.vue"
	import uniListItem from "@/components/uni-list-item/uni-list-item.vue"
	export default {
		components: { uniList, uniListItem },
		data() {
			return {
				housList: [],
			}
		},
		mounted() {
			this.getHouse();
		},
		methods: {
			getHouse() {
				let params = {
					// customerId: uni.getStorageSync('user').roleId
				}
				this.$api.getPayItemList2(params).then((res) => {
					if (res.success) {
						this.housList = res.rows
					}
				}).catch((err) => {
					console.log('request fail', err);
				})
			},
			djxm(item) {
				uni.setStorageSync('payItemId', item.id);
				uni.setStorageSync('payItembatch', item.batch);
				uni.navigateTo({
				    url: '../payBatch/payBatch'
				});
			},
		}
	}
</script>

<style scoped>
</style>
